package com.smartstate.EnvironmentMonitor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartstate.EnvironmentMonitor.entity.Systemmonitor;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface SystemmonitorMapper extends BaseMapper<Systemmonitor> {
    /**
     * 获取工业看板对应的所有deviceId
     * @return
     */
    @MapKey("deviceId")
    @Select("select deviceId, way from equipmentconfiguration " +
            "where type = (select type from equipment_type where name = '工业看板')")
    Map<String, Map> getDeviceIds();
}
